#include <iostream>
using std::cout;
using std::endl;

double division(double a,double b){
    if( b == 0 ){
        throw "Division by zero";
    }
    if( a == 0 ){
        throw 0;
    }
    return a/b;
}

void test0(){
    double x =1000,y = 50;
    try{
        double z = division(x,y);
        cout << z << endl;
    }catch(const char * msg){
        cout << msg << endl;
    }catch(int x){
        cout << "int:" << x << endl;
    }
    cout << "over" << endl;
}

int main(void){
    test0();
    return 0;
}
